package com.neu.cloudFactory.VO;

import com.neu.cloudFactory.PO.ProductMsg;
import com.neu.cloudFactory.PO.ProductType;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
public class ProductMsgVO {
    private String id;
    private String code;
    private String name;
    private String type;
    private String detail;

    public ProductMsgVO(ProductMsg productMsg, ProductType type){
        this.id = Integer.toString(productMsg.getId());
        this.code = productMsg.getCode();
        this.name = productMsg.getName();
        this.type = type.getName();
        this.detail = productMsg.getDetail();
    }

}
